<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }

    p {
        font-size: 100px;
        font-weight: bold;
        text-align: center;
    }
    li{
        list-style: none;
        font-size: large;
        text-align: center;
    }
    li a{
        color: red;
        text-decoration: none;
    }
</style>

<body>
    <p class="time"></p>

    <ul id="tips"></ul>
    <textarea name="text" id="text" cols="50" rows="2"></textarea><button>添加信息</button></body>
<script>

    setInterval(function () {
        var time = new Date();
        var t = time.toLocaleTimeString();
        document.querySelector('.time').innerHTML = t;
    }, 1000);

    var tips = document.querySelector('#tips');
    var text = document.querySelector('#text');
    var btn = document.querySelector('button');

    btn.addEventListener('click', function () {
        var li = document.createElement('li');
        li.innerHTML = text.value+'<a href="javascript:void(0)" onclick="this.parentNode.remove()">删除</a>';
        tips.appendChild(li);
        text.value = '';
    });
</script>

</html>